<?php

namespace frontendx\models;

/**
 * @author  shuang
 * @date    2016-11-15 21:20:42
 * @version V1.0
 * @desc    
 */
use common\models\UserDrawal;
use Yii;
class WB_UserDrawal extends UserDrawal {
    
    public static $status = [1=>"审核中",2=>"审核通过",3=>"审核未通过"];
  
    public static function getList() {
        $query = WB_UserDrawal::find()->orderBy("created_at desc");
        $countQuery = clone $query;
        $pager = new \yii\data\Pagination(['totalCount' => $countQuery->count(), 'defaultPageSize' => 10]);
        $offset = Yii::$app->request->get("offset");
        $limit = Yii::$app->request->get("limit");
        $res = $query->offset($offset)->limit($limit)->all();
        return ["pager" => $pager, "data" => $res];
    }
}
